//
//  FirstDatailTableViewCell.m
//  bh
//
//  Created by lanou on 15/12/21.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "FirstDatailTableViewCell.h"
#import "CollectionViewCell.h"

@implementation FirstDatailTableViewCell





- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;

        //创建collectionView的设置
        //创建一个布局对象
        UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc]init];
        //列距
        flowLayout.minimumInteritemSpacing = 10;
        //行距
        flowLayout.minimumLineSpacing = 10;
        //分区内边距
        flowLayout.sectionInset = UIEdgeInsetsMake(5, 5, 5, 5);
        //itemSize 设置为一行两列
        CGFloat itemWidth = (kWidth - 10 - 10) / 2;
        flowLayout.itemSize = CGSizeMake(itemWidth, itemWidth);
        flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
        self.FirstCollectionView = [[UICollectionView alloc]initWithFrame:(CGRectMake(0, 0, kWidth, 950)) collectionViewLayout:flowLayout];
        self.FirstCollectionView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.FirstCollectionView];
    }
    return self;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
